<template>
    <div>
        {{ message }}
        <button @click="greet()">问候</button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            message:"Hello,Friend!"
        }
    },
    methods: {
        greet() {
            this.message = "Hello," + this.$attrs.name + '!'
        }
    },
}
</script>